package com.ch.light.web.mapper;

import com.ch.light.web.model.User;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface UserMapper extends Mapper<User> {

    void removeAssignRolesByUserId(String userId);

    List<String> getPermissions(@Param("username") String username);

    int assignRole(@Param("userId") String userId, @Param("roleId") String roleId);

    int reassignRole(@Param("userId") String userId, @Param("roleId") String roleId);
}